Open
Conversation
This commit adds support for tracking f41 PDP (Proof of Data Possession) deals alongside legacy f05 market deals. Changes: - Add DealType field to Deal model (market vs pdp) - Add PDP-specific fields: ProofSetID, ProofSetLive, NextChallengeEpoch - Add migration to set deal_type='market' for existing deals - Update deal tracker to set DealType when inserting market deals - Add PDPTracker worker type and service stub - Add pdp-tracker CLI command - Add deal-type filter to deal list command The PDPTracker service is a stub awaiting go-synapse integration (PR #2). Once go-synapse is merged, the PDPClient interface will be implemented to fetch proof set data from the PDPVerifier contract. Part of: Filecoin Foundation contract milestone 1
The DealType field had an inline comment which caused swag to generate
an 'allOf' wrapper in the OpenAPI spec. This caused go-swagger to generate
a struct wrapper type that couldn't unmarshal plain JSON strings.
Removed the inline comment and regenerated swagger to use a direct $ref,
matching how DealState is handled.
Fixes the failing test:
- json: cannot unmarshal string into Go struct field ModelDeal.dealType of type struct { models.ModelDealType }
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds foundational support for f41 PDP (Proof of Data Possession) deals alongside legacy f05 market deals, while keeping this PR intentionally small.
This PR focuses on:
DealTypesupport in the model/API/migration pathpiece_cidhandlingScope in This PR
Model + API + Migration
DealTypewith valuesmarket(legacy f05) andpdp(f41)DealTypefield onmodel.Dealwith defaultmarketmodel.Deal:ProofSetIDProofSetLiveNextChallengeEpochdeal_type='market'--deal-typefiltering support todeal list(CLI + handler)Worker / Tracker
PDPTrackerworker typepiece_cidbehavior so it uses parsed CID values for lookup/insertTests
Follow-up Plan
run pdp-trackerto a real go-synapse-backedPDPClientdeal_typeTesting